
PRESET = $(shell npm config get prefix)/lib/node_modules/babel-preset-es2015/

all: rsms.js
clean:
	rm -f rsms-raw.js
prepare:
	sudo npm install -g requirejs babel-preset-es2015
	sudo npm install -g --save-dev babel-cli

rsms.js: rsms-raw.js
	babel --presets $(PRESET) $< > $@
rsms-raw.js: $(wildcard src/**)
	r.js -o baseUrl=src/ name=init out=rsms-raw.js optimize=none


